package com.zhanqiao.Dao;

import com.zhanqiao.Utils.GetDataSourceUtil;
import org.apache.commons.dbutils.QueryRunner;

import javax.sql.DataSource;
import java.sql.SQLException;

public class AdminDao {
    public  void getAdmidata( Object []objects) throws SQLException {
        DataSource dataSource= GetDataSourceUtil.getDataSource();
        QueryRunner queryRunner=new QueryRunner(dataSource);
        for(int i=0;i<objects.length;i++){
            System.out.println(objects[i]);
        }
        queryRunner.update("insert into admin(aname,city1,city2,city3,asex,asign) values(?,?,?,?,?,?)",objects);
//    queryRunner.update("insert into admin(aname) values('安弟')");
    }


}
